<template>
  <div>
    <h2>{{name}}</h2>
    <slot name="code"></slot>
    <div class="code-content" v-highlight>
      <div></div>
      <pre><code class="html">{{ computedCodeStr }}</code></pre>
    </div>
  </div>
</template>
<script>
export default {
  data () {
    return {
    }
  },
  props: {
    name: {
      type: String,
      default: ''
    },
    codeStr: {
      type: String,
      default: ''
    },
  },
  methods: {
  },
  computed: {
  },
  components: {
  },
  created() {
  },
  mounted() {
  },
  destroyed() {
  },
  computed: {
    computedCodeStr() {
      return this.codeStr.replace(/^ {8}/gm, '').trim()
    },
  },
};
</script>
<style>
</style>
